import request from '@/utils/request'

// 查询订单分期付款列表
export function listSpread(query) {
  return request({
    url: '/system/orderSpread/list',
    method: 'get',
    params: query
  })
}

// 查询订单分期付款详细
export function getSpread(id) {
  return request({
    url: '/system/orderSpread/' + id,
    method: 'get'
  })
}

// 新增订单分期付款
export function addSpread(data) {
  return request({
    url: '/system/orderSpread',
    method: 'post',
    data: data
  })
}

// 修改订单分期付款
export function updateSpread(data) {
  return request({
    url: '/system/orderSpread',
    method: 'put',
    data: data
  })
}

// 删除订单分期付款
export function delSpread(id) {
  return request({
    url: '/system/orderSpread/' + id,
    method: 'delete'
  })
}
